<?php
/**
 * ------------------------------------------------------------------------
 * JA Disqus Debate Echo plugin for Joomla 1.7.x
 * ------------------------------------------------------------------------
 * Copyright (C) 2004-2011 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
 * @license - GNU/GPL, http://www.gnu.org/licenses/gpl.html
 * Author: J.O.O.M Solutions Co., Ltd
 * Websites: http://www.joomlart.com - http://www.joomlancers.com
 * ------------------------------------------------------------------------
 */

	//IntenseDebate config
	$account        = $this->plgParams->get('provider-intensdebate-account');
	
	if ($this->isComment == false) {
	$url = str_replace('&amp;', '&', $this->_url );
	?>
    	<span class="containerCountComment" onclick="window.location.href='<?php echo $this->_url;?>#idc-container'; return false;">
		<script type="text/javascript">
		//<![CDATA[
			var idcomments_acct = "<?php echo $account?>";
			var idcomments_post_id = "<?php echo $this->_postid?>";
			var idcomments_post_url = encodeURIComponent("<?php echo $url;?>");
		//]]> 
		</script>
		<script type="text/javascript" src="http://www.intensedebate.com/js/genericLinkWrapperV2.js"></script>
        </span>
	<?php }else{?>
		<script type="text/javascript">
		//<![CDATA[
		var idcomments_acct = "<?php echo $account?>";
		var idcomments_post_id = "<?php echo $this->_postid?>";
		var idcomments_post_url = "<?php echo $this->_url?>";
		//]]> 
		</script>
		<span id="IDCommentsPostTitle" style="display:none"></span>
		<script type="text/javascript" src="http://www.intensedebate.com/js/genericCommentWrapperV2.js"></script>
	<?php } ?>